home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 32 / Mac Magazin and MacEasy Magazine CD - Issue 32.iso / Grafik & Text / OzTeX3.0 / TeX-inputs / LaTeX / base / doc.sty < prev    next >
Text File  |  1997-03-07  |  31KB  |  836 lines

  1. %%
  2. %% This is file `doc.sty',
  3. %% generated with the docstrip utility.
  4. %%
  5. %% The original source files were:
  6. %%
  7. %% doc.dtx  (with options: `package')
  8. %% 
  9. %% This is a generated file.
  10. %% 
  11. %% Copyright 1993 1994 1995 1996 1997
  12. %% The LaTeX3 Project and any individual authors listed elsewhere
  13. %% in this file.
  14. %% 
  15. %% For further copyright information, and conditions for modification
  16. %% and distribution, see the file legal.txt, and any other copyright
  17. %% notices in this file.
  18. %% 
  19. %% This file is part of the LaTeX2e system.
  20. %% ----------------------------------------
  21. %%   This system is distributed in the hope that it will be useful,
  22. %%   but WITHOUT ANY WARRANTY; without even the implied warranty of
  23. %%   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  24. %% 
  25. %%   For error reports concerning UNCHANGED versions of this file no
  26. %%   more than one year old, see bugs.txt.
  27. %% 
  28. %%   Please do not request updates from us directly.  Primary
  29. %%   distribution is through the CTAN archives.
  30. %% 
  31. %% 
  32. %% IMPORTANT COPYRIGHT NOTICE:
  33. %% 
  34. %% You are NOT ALLOWED to distribute this file alone.
  35. %% 
  36. %% You are allowed to distribute this file under the condition that it
  37. %% is distributed together with all the files listed in manifest.txt.
  38. %% 
  39. %% If you receive only some of these files from someone, complain!
  40. %% 
  41. %% 
  42. %% Permission is granted to copy this file to another file with a
  43. %% clearly different name and to customize the declarations in that
  44. %% copy to serve the needs of your installation, provided that you
  45. %% comply with the conditions in the file legal.txt.
  46. %% 
  47. %% However, NO PERMISSION is granted to generate or to distribute a
  48. %% modified version of this file under its original name.
  49. %% 
  50. %% You are NOT ALLOWED to change this file.
  51. %% 
  52. %% 
  53. %% MODIFICATION ADVICE:
  54. %% 
  55. %% If you want to customize this file, it is best to make a copy of
  56. %% the source file(s) from which it was produced.  Use a different
  57. %% name for your copy(ies) and modify the copy(ies); this will ensure
  58. %% that your modifications do not get overwritten when you install a
  59. %% new release of the standard system.  You should also ensure that
  60. %% your modified source file does not generate any modified file with
  61. %% the same name as a standard file.
  62. %% 
  63. %% You can then easily distribute your modifications by distributing
  64. %% the modified and renamed copy of the source file, taking care to
  65. %% observe the conditions in legal.txt; this will ensure that other
  66. %% users can safely use your modifications.
  67. %% 
  68. %% You will also need to produce your own, suitably named, .ins file to
  69. %% control the generation of files from your source file; this file
  70. %% should contain your own preambles for the files it generates, not
  71. %% those in the standard .ins files.
  72. %% 
  73. %% The names of the source files used are shown above.
  74. %% 
  75. %% 
  76. %% 
  77. \NeedsTeXFormat{LaTeX2e}[1994/12/01]
  78.  \ProvidesPackage{doc}
  79.   [1997/02/05 v1.9z
  80.    Standard LaTeX documentation package (FMi)]
  81. %% \CharacterTable
  82. %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
  83. %%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
  84. %%   Digits        \0\1\2\3\4\5\6\7\8\9
  85. %%   Exclamation   \!     Double quote  \"     Hash (number) \#
  86. %%   Dollar        \$     Percent       \%     Ampersand     \&
  87. %%   Acute accent  \'     Left paren    \(     Right paren   \)
  88. %%   Asterisk      \*     Plus          \+     Comma         \,
  89. %%   Minus         \-     Point         \.     Solidus       \/
  90. %%   Colon         \:     Semicolon     \;     Less than     \<
  91. %%   Equals        \=     Greater than  \>     Question mark \?
  92. %%   Commercial at \@     Left bracket  \[     Backslash     \\
  93. %%   Right bracket \]     Circumflex    \^     Underscore    \_
  94. %%   Grave accent  \`     Left brace    \{     Vertical bar  \|
  95. %%   Right brace   \}     Tilde         \~}
  96. %%
  97. %% Package `doc' to use with LaTeX 2e
  98. %% Copyright (C) 1989-1997 Frank Mittelbach, all rights reserved.
  99. \@ifundefined{macro@cnt}{}{\endinput}
  100. \catcode`\^^A=14
  101. \def\macrocode{\macro@code
  102.    \frenchspacing \@vobeyspaces
  103.    \xmacro@code}
  104. \def\macro@code{%
  105.    \topsep \MacrocodeTopsep
  106.    \@beginparpenalty \predisplaypenalty
  107.    \if@inlabel\leavevmode\fi
  108.    \trivlist \parskip \z@ \item[]%
  109.    \macro@font
  110.    \leftskip\@totalleftmargin \advance\leftskip\MacroIndent
  111.    \rightskip\z@ \parindent\z@ \parfillskip\@flushglue
  112.    \blank@linefalse \def\par{\ifblank@line
  113.                              \leavevmode\fi
  114.                              \blank@linetrue\@@par
  115.                              \penalty\interlinepenalty}
  116.    \obeylines
  117.    \let\do\do@noligs \verbatim@nolig@list
  118.    \let\do\@makeother \dospecials
  119.    \global\@newlistfalse
  120.    \global\@minipagefalse
  121.    \ifcodeline@index
  122.      \everypar{\global\advance\c@CodelineNo\@ne
  123.                \llap{\theCodelineNo\ \hskip\@totalleftmargin}%
  124.                \check@module}%
  125.    \else \everypar{\check@module}%
  126.    \fi
  127.    \init@crossref}
  128. \newif\ifblank@line
  129. \def\endmacrocode{%
  130.                  \ifpm@module \endgroup \pm@modulefalse \fi
  131.                  \everypar{}%
  132.                  \global\@inlabelfalse
  133.                  \endtrivlist
  134.                  \close@crossref}
  135. \@ifundefined{MacroFont}{%
  136.   \if@compatibility
  137.     \def\MacroFont{\small
  138.                    \usefont\encodingdefault
  139.                            \ttdefault
  140.                            \mddefault
  141.                            \updefault
  142.                    }%
  143.   \else
  144.     \def\MacroFont{\fontencoding\encodingdefault
  145.                    \fontfamily\ttdefault
  146.                    \fontseries\mddefault
  147.                    \fontshape\updefault
  148.                    \small}%
  149.   \fi
  150.   }{}
  151. \@ifundefined{AltMacroFont}{%
  152.   \if@compatibility
  153.     \def\AltMacroFont{\small
  154.                       \usefont\encodingdefault
  155.                               \ttdefault
  156.                               \mddefault
  157.                               \sldefault
  158.                       }%
  159.   \else
  160.     \def\AltMacroFont{\fontencoding\encodingdefault
  161.                       \fontfamily\ttdefault
  162.                       \fontseries\mddefault
  163.                       \fontshape\sldefault
  164.                       \small
  165.                       }%
  166.  \fi
  167.   }{}
  168. \let\macro@font=\MacroFont
  169. \def\check@module{%
  170.   \ifcheck@modules
  171.     \ifpm@module \endgroup \pm@modulefalse \fi
  172.     \expandafter\futurelet\expandafter\next\expandafter\ch@percent
  173.   \fi}
  174. \newif\ifpm@module
  175. \def\DontCheckModules{\check@modulesfalse}
  176. \def\CheckModules{\check@modulestrue}
  177. \newif\ifcheck@modules  \check@modulestrue
  178. \def\ch@percent{%
  179.   \if \percentchar\next
  180.     \expandafter\check@angle
  181.   \fi}
  182. \def\check@angle#1{\futurelet\next\ch@angle}
  183. \begingroup
  184. \catcode`\<\active
  185. \gdef\ch@angle{\ifx<\next
  186.     \expandafter\ch@plus@etc
  187.   \else \percentchar \fi}
  188. \gdef\ch@plus@etc<{\futurelet\next\check@plus@etc}
  189. \endgroup
  190. \def\check@plus@etc{%
  191.     \if +\next
  192.       \let\next\pm@module
  193.     \else\if -\next
  194.       \let\next\pm@module
  195.     \else\if *\next
  196.       \let\next\star@module
  197.     \else\if /\next
  198.       \let\next\slash@module
  199.     \else
  200.       \let\next\pm@module
  201.     \fi\fi\fi\fi
  202.     \next}
  203. \begingroup
  204. \catcode`\~=\active
  205. \lccode`\~=`\>
  206. \lowercase{\gdef\pm@module#1~}{\pm@moduletrue
  207.    \Module{#1}\begingroup
  208.      \advance\guard@level\@ne
  209.      \ifnum\guard@level>\c@StandardModuleDepth\AltMacroFont\fi
  210. }
  211. \lowercase{\gdef\star@module#1~}{%
  212.   \Module{#1}%
  213.   \global \advance \guard@level\@ne
  214.   \ifnum \guard@level>\c@StandardModuleDepth
  215.     \global\let\macro@font=\AltMacroFont \macro@font
  216.   \fi}
  217. \catcode`\>=\active
  218. \gdef\slash@module#1>{%
  219.   \Module{#1}%
  220.   \global \advance \guard@level\m@ne
  221.   \ifnum \guard@level=\c@StandardModuleDepth
  222.     \global\let\macro@font\MacroFont  \macro@font
  223.   \fi
  224. }
  225. \endgroup
  226. \newcounter{StandardModuleDepth}
  227. \newcount \guard@level
  228. \@ifundefined{Module}{%
  229.       \def\Module#1{\mod@math@codes$\langle\mathsf{#1}\rangle$}
  230.   }{}
  231. \def\mod@math@codes{\mathcode`\|="226A \mathcode`\&="2026}
  232. \newskip\MacrocodeTopsep \MacrocodeTopsep = 3pt plus 1.2pt minus 1pt
  233. \newdimen\MacroIndent
  234. \settowidth\MacroIndent{\rmfamily\scriptsize 00\ }
  235. \@namedef{macrocode*}{\macro@code\sxmacro@code}
  236. \expandafter\let\csname endmacrocode*\endcsname = \endmacrocode
  237. \catcode`\!=\catcode`\%   ^^A In this section there must not be
  238.                               ^^A any exclamation marks.
  239.                               ^^A
  240. \begingroup
  241. \catcode`\|=\z@ \catcode`\[=\@ne \catcode`\]=\tw@
  242. \catcode`\{=12 \catcode`\}=12
  243. \catcode`\%=12 \catcode`\ =\active \catcode`\\=\active
  244. !%    \end{macrocode*}
  245. !    Next follows the actual definition of  |\macro@code|;
  246. !    notice the
  247. !    use of the new escape character.  We manage to get the argument
  248. !    surrounded by the string |\end{macrocode}|, but at the end
  249. !    however, in spite of the actual characters used during the
  250. !    definition of
  251. !    this macro, |\end| with the argument |{macrocode}|
  252. !    will be executed, to ensure a balanced environment.
  253. !    \begin{macrocode*}
  254. |gdef|xmacro@code#1%    \end{macrocode}[#1|end[macrocode]]
  255. !%    \end{macrocode*}
  256. ! \begin{macro}{\sxmacro@code}
  257. !    The definition of |\sxmacro@code| is completely analogous,
  258. !    only
  259. !    here a slightly different terminating string will be used.
  260. !    Note that the space is not active in this environment.
  261. !    \begin{macrocode}
  262. |catcode`| =12
  263. |gdef|sxmacro@code#1%    \end{macrocode*}[#1|end[macrocode*]]
  264. !%    \end{macrocode}
  265. !    because the |\catcode| changes have been made local by
  266. !    commencing a
  267. !    new group, there now follows the matching |\endgroup|
  268. !    in a rather
  269. !    unusual style of writing.
  270. !    \begin{macrocode}
  271. |endgroup
  272. !%    \end{macrocode}
  273. \catcode`\!=12
  274. \def\DescribeMacro{\leavevmode\@bsphack
  275.    \begingroup\MakePrivateLetters\Describe@Macro}
  276. \def\Describe@Macro#1{\endgroup
  277.               \marginpar{\raggedleft\PrintDescribeMacro{#1}}%
  278.               \SpecialUsageIndex{#1}\@esphack\ignorespaces}
  279. \def\DescribeEnv{\leavevmode\@bsphack\begingroup\MakePrivateLetters
  280.   \Describe@Env}
  281. \def\Describe@Env#1{\endgroup
  282.               \marginpar{\raggedleft\PrintDescribeEnv{#1}}%
  283.               \SpecialEnvIndex{#1}\@esphack\ignorespaces}
  284. \reversemarginpar
  285. \setlength\marginparpush{0pt}  \setlength\marginparwidth{8pc}
  286. {\catcode`\|=\z@ \catcode`\\=12
  287. |gdef|bslash{\}}
  288. \def\verbatim{\@beginparpenalty \predisplaypenalty \@verbatim
  289.               \MacroFont \frenchspacing \@vobeyspaces \@xverbatim}
  290. \@namedef{verbatim*}{\@beginparpenalty \predisplaypenalty \@verbatim
  291.               \MacroFont \@sxverbatim}
  292. \def\@verbatim{\trivlist \item[]\if@minipage\else\vskip\parskip\fi
  293.       \leftskip\@totalleftmargin\rightskip\z@
  294.       \parindent\z@\parfillskip\@flushglue\parskip\z@
  295.       \@@par
  296.       \@tempswafalse
  297.  \def\par{\if@tempswa\hbox{}\fi\@tempswatrue\@@par
  298.           \penalty\interlinepenalty
  299.    \check@percent}%
  300.  \obeylines
  301.  \let\do\do@noligs \verbatim@nolig@list
  302.  \let\do\@makeother \dospecials}
  303. {\catcode`\%=12
  304.  \long\gdef\check@percent#1{\ifx #1%\let\next\@empty \else
  305.                                     \let\next=#1\fi \next}}
  306. \def\verb{\relax\ifmmode\hbox\else\leavevmode\null\fi
  307.   \bgroup \let\do\do@noligs \verbatim@nolig@list
  308.     \ttfamily \verb@eol@error \let\do\@makeother \dospecials
  309.     \@ifstar{\@sverb}{\@vobeyspaces \frenchspacing \@sverb}}
  310. \let\verb@balance@group\@empty
  311.  
  312. \def\verb@egroup{\global\let\verb@balance@group\@empty\egroup}
  313.  
  314. \begingroup
  315.   \obeylines%
  316.   \gdef\verb@eol@error{\obeylines%
  317.     \def^^M{\verb@egroup\@latex@error{%
  318.            Text for \noexpand\verb command ended by end of line}\@ehc}}%
  319. \endgroup
  320. \def\@sverb#1{%
  321.   \catcode`#1\active  \lccode`\~`#1%
  322.   \gdef\verb@balance@group{\verb@egroup
  323.      \@latex@error{Illegal use of \noexpand\verb command}\@ehc}%
  324.   \aftergroup\verb@balance@group
  325.   \lowercase{\let~\verb@egroup}}
  326. \def\verbatim@nolig@list{\do\`\do\<\do\>\do\,\do\'\do\-}
  327. \def\do@noligs#1{%
  328.   \catcode`#1\active
  329.   \begingroup
  330.      \lccode`\~=`#1\relax
  331.      \lowercase{\endgroup\def~{\leavevmode\kern\z@\char`#1}}}
  332. \newcount\macro@cnt \macro@cnt=0
  333. \def\macro{\begingroup
  334.    \catcode`\\12
  335.    \MakePrivateLetters \m@cro@ \iftrue}
  336. \def\environment{\begingroup
  337.    \catcode`\\12
  338.    \MakePrivateLetters \m@cro@ \iffalse}
  339. \long\def\m@cro@#1#2{\endgroup \topsep\MacroTopsep \trivlist
  340.    \edef\saved@macroname{\string#2}%
  341.   \def\makelabel##1{\llap{##1}}%
  342.   \if@inlabel
  343.     \let\@tempa\@empty \count@\macro@cnt
  344.     \loop \ifnum\count@>\z@
  345.       \edef\@tempa{\@tempa\hbox{\strut}}\advance\count@\m@ne \repeat
  346.     \edef\makelabel##1{\llap{\vtop to\baselineskip
  347.                                {\@tempa\hbox{##1}\vss}}}%
  348.     \advance \macro@cnt \@ne
  349.   \else  \macro@cnt\@ne  \fi
  350.   \edef\@tempa{\noexpand\item[%
  351.      #1%
  352.        \noexpand\PrintMacroName
  353.      \else
  354.        \noexpand\PrintEnvName
  355.      \fi
  356.      {\string#2}]}%
  357.   \@tempa
  358.   \global\advance\c@CodelineNo\@ne
  359.    #1%
  360.       \SpecialMainIndex{#2}\nobreak
  361.       \DoNotIndex{#2}%
  362.    \else
  363.       \SpecialMainEnvIndex{#2}\nobreak
  364.    \fi
  365.   \global\advance\c@CodelineNo\m@ne
  366.   \ignorespaces}
  367. \let\endmacro \endtrivlist
  368. \let\endenvironment\endmacro
  369. \newskip\MacroTopsep     \MacroTopsep = 7pt plus 2pt minus 2pt
  370. \@ifundefined{PrintMacroName}
  371.    {\def\PrintMacroName#1{\strut \MacroFont \string #1\ }}{}
  372. \@ifundefined{PrintDescribeMacro}
  373.    {\def\PrintDescribeMacro#1{\strut \MacroFont \string #1\ }}{}
  374. \@ifundefined{PrintDescribeEnv}
  375.    {\def\PrintDescribeEnv#1{\strut \MacroFont #1\ }}{}
  376. \@ifundefined{PrintEnvName}
  377.    {\def\PrintEnvName#1{\strut \MacroFont #1\ }}{}
  378. \begingroup
  379. \catcode`\~\active
  380. \gdef\SpecialEscapechar#1{%
  381.     \begingroup
  382.      \uccode`\~`#1%
  383.      \uppercase{\gdef\active@escape@char{~}}%
  384.      \escapechar\m@ne  \xdef\special@escape@char{\string#1}%
  385.    \endgroup}
  386. \endgroup
  387. \begingroup   \catcode`\|=\z@  \catcode`\\=\active
  388. |gdef|init@crossref{|catcode`|\|active   |let\|bslash
  389.     |MakePrivateLetters
  390.     |catcode|expandafter`|special@escape@char|active
  391.     |expandafter|let|active@escape@char|scan@macro}
  392. |endgroup
  393. \SpecialEscapechar{\\}
  394. \@ifundefined{MakePrivateLetters}
  395.     {\let\MakePrivateLetters\makeatletter}{}
  396. \def\close@crossref{\SpecialEscapechar\\}
  397. \def\scan@macro{%
  398.    \special@escape@char
  399.    \step@checksum
  400.    \ifscan@allowed
  401.       \let\macro@namepart\@empty
  402.       \def\next{\futurelet\next\macro@switch}%
  403.    \else \let\next\@empty \fi
  404.    \next}
  405. \newif\ifscan@allowed    \scan@allowedtrue
  406. \def\DisableCrossrefs{\@bsphack\scan@allowedfalse\@esphack}
  407. \def\EnableCrossrefs{\@bsphack\scan@allowedtrue
  408.                      \def\DisableCrossrefs{\@bsphack\@esphack}\@esphack}
  409. \def\macro@switch{\ifcat\noexpand\next a%
  410.      \let\next\macro@name
  411.      \else \let\next\short@macro  \fi
  412.    \next}
  413. \def\short@macro#1{\begingroup
  414.    \catcode`\&=11  \uccode`\&=\expandafter`\string#1%
  415.    \uppercase{\def\macro@namepart{&}}%
  416.    \endgroup
  417.    \ifnot@excluded
  418.      \produce@index{#1}\fi
  419.     \scan@allowedfalse#1%
  420.     \scan@allowedtrue }
  421. \def\produce@index#1{%
  422.   \if\noexpand#1\special@escape@char
  423.      \scan@allowedfalse \it@is@a\special@escape@char \else
  424.      \if\noexpand#1\bslash \it@is@a\bslash \else
  425.        \if\noexpand#1\space \it@is@a\space \else
  426.          \ifx#1\par
  427.          \it@is@a\space \else
  428.          \ifx#1\relax \else
  429.            \if\noexpand#1\bgroup \LeftBraceIndex \else
  430.              \if\noexpand#1\egroup \RightBraceIndex \else
  431.                \if\noexpand#1\percentchar \PercentIndex \else
  432.                  \it@is@a{\string#1}%
  433.        \fi \fi \fi \fi \fi \fi \fi \fi}
  434. \def\macro@name#1{\edef\macro@namepart{\macro@namepart#1}%
  435.      \futurelet\next\more@macroname}
  436. \def\more@macroname{\ifcat\noexpand\next a%
  437.      \let\next\macro@name
  438.      \else \let\next\macro@finish \fi
  439.      \next}
  440. \def\macro@finish{%
  441.   \macro@namepart
  442.   \ifnot@excluded
  443.      \edef\@tempa{\noexpand\SpecialIndex{\bslash\macro@namepart}}%
  444.      \@tempa  \fi}
  445. \def\DoNotIndex{\begingroup \MakePrivateLetters
  446.     \catcode`\\12
  447.     \do@not@index}
  448. \long\def\do@not@index#1{%
  449.     \endgroup
  450.     \addto@hook\index@excludelist{#1,}}
  451. \long\def\addto@hook#1#2{#1\expandafter{\the#1#2}}
  452. \newtoks\index@excludelist
  453. \index@excludelist{}
  454. \begingroup
  455. \catcode`\|=0%
  456. \catcode`\\=12
  457. |gdef|ifnot@excluded{|expandafter
  458.      |expanded@notin|expandafter{|expandafter
  459.      \|macro@namepart,}{|the|index@excludelist}}
  460. |endgroup
  461. \def\expanded@notin#1#2{%
  462.  \def\in@@##1#1##2##3\in@@{%
  463.   \ifx\expanded@notin##2}%
  464.  \expandafter\in@@#2#1\expanded@notin\in@@}
  465. \@ifundefined{actualchar}{\def\actualchar{=}}{}
  466. \@ifundefined{quotechar}{\def\quotechar{!}}{}
  467. \@ifundefined{levelchar}{\def\levelchar{>}}{}
  468. \@ifundefined{encapchar}{\def\encapchar{|}}{}
  469. \@ifundefined{verbatimchar}{\def\verbatimchar{+}}{}
  470. \def\SpecialIndex#1{\@bsphack\special@index{\expandafter\@gobble
  471.                                       \string#1\actualchar
  472.       \string\verb\quotechar*\verbatimchar\string#1\verbatimchar}%
  473.     \@esphack}
  474.  
  475. \def\SpecialMainIndex#1{\@bsphack\special@index{\expandafter\@gobble
  476.                                         \string#1\actualchar
  477.                                         \string\verb
  478.                                         \quotechar*\verbatimchar
  479.                                         \string#1\verbatimchar
  480.                                         \encapchar main}%
  481.                         \@esphack}
  482. \def\SpecialMainEnvIndex#1{\@bsphack\special@index{%
  483.                                       #1\actualchar
  484.                                       {\string\ttfamily\space#1}
  485.                                          (environment)%
  486.                                       \encapchar main}%
  487.     \index{environments:\levelchar{\protect\ttfamily#1}\encapchar
  488.            main}\@esphack}
  489. \def\SpecialUsageIndex#1{\@bsphack\index{\expandafter\@gobble\string#1%
  490.     \actualchar\string\verb\quotechar*\verbatimchar
  491.     \string#1\verbatimchar
  492.     \encapchar usage}\@esphack}
  493. \def\SpecialEnvIndex#1{\@bsphack
  494.     \index{#1\actualchar{\protect\ttfamily#1}
  495.            (environment)\encapchar usage}%
  496.     \index{environments:\levelchar{\protect\ttfamily#1}\encapchar
  497.            usage}\@esphack}
  498. \def\SortIndex#1#2{\index{#1\actualchar#2}}
  499. \def\it@is@a#1{\special@index{\quotechar #1\actualchar
  500.                           \string\verb\quotechar*\verbatimchar
  501.                           \quotechar\bslash\quotechar#1\verbatimchar}}
  502. \@ifundefined{LeftBraceIndex}{\def\LeftBraceIndex{%
  503.    \special@index{\bgroup\actualchar\string\verb\quotechar*\verbatimchar
  504.           \quotechar\bslash{\verbatimchar\string\iffalse}\string\fi}}}{}
  505.  
  506. \@ifundefined{RightBraceIndex}{\def\RightBraceIndex{%
  507.  \special@index{\egroup\actualchar\string\iffalse{\string\fi\string\verb
  508.            \quotechar*\verbatimchar\quotechar\bslash}\verbatimchar}}}{}
  509. \@ifundefined{PercentIndex}
  510.   {\def\PercentIndex{\it@is@a\percentchar}}{}
  511. \def\OldMakeindex{\def\PercentIndex{%
  512.     \special@index{\quotechar\percentchar\actualchar\string\verb
  513.            \quotechar*\verbatimchar\quotechar\bslash
  514.            \percentchar\percentchar\verbatimchar}}}
  515. {\catcode`\%=12 \gdef\percentchar{%}}
  516. \newif\ifhave@multicol
  517. \IfFileExists{multicol.sty}{\have@multicoltrue
  518.                             \RequirePackage{multicol}%
  519.                            }{}
  520.  
  521. \newdimen\IndexMin         \IndexMin       = 80pt
  522. \newcount\c@IndexColumns   \c@IndexColumns = 3
  523. \ifhave@multicol
  524.   \renewenvironment{theindex}
  525.     {\begin{multicols}\c@IndexColumns[\index@prologue][\IndexMin]%
  526.       \IndexParms \let\item\@idxitem \ignorespaces}%
  527.     {\end{multicols}}
  528. \else
  529.   \typeout{Can't find multicol.sty -- will use normal index layout if
  530.      necessary.}
  531.   \def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi
  532.     \columnseprule \z@  \columnsep 35\p@
  533.     \twocolumn[\index@prologue]%
  534.     \IndexParms \let\item\@idxitem \ignorespaces}
  535.   \def\endtheindex{\if@restonecol\onecolumn\else\clearpage\fi}
  536. \fi
  537. \long\def\IndexPrologue#1{\@bsphack\def\index@prologue{#1}\@esphack}
  538. \@ifundefined{index@prologue}
  539.      {\def\index@prologue{\section*{Index}%
  540.                  \markboth{Index}{Index}%
  541.                  Numbers written in italic refer to the page
  542.                  where the corresponding entry is described, the ones
  543.                  underlined to the
  544.                  \ifcodeline@index
  545.                    code line of the
  546.                  \fi
  547.                  definition, the rest to the
  548.                  \ifcodeline@index
  549.                    code lines
  550.                  \else
  551.                    pages
  552.                  \fi
  553.                  where the entry is used.
  554.                  }}{}
  555. \@ifundefined{IndexParms}
  556.     {\def\IndexParms{%
  557.        \parindent \z@
  558.        \columnsep 15pt
  559.        \parskip 0pt plus 1pt
  560.        \rightskip 15pt
  561.        \mathsurround \z@
  562.        \parfillskip=-15pt
  563.         \small
  564.        \def\@idxitem{\par\hangindent 30pt}%
  565.        \def\subitem{\@idxitem\hspace*{15pt}}%
  566.        \def\subsubitem{\@idxitem\hspace*{25pt}}%
  567.        \def\indexspace{\par\vspace{10pt plus 2pt minus 3pt}}%
  568.       }}{}
  569. \def\efill{\hfill\nopagebreak}%
  570. \def\dotfill{\leaders\hbox to.6em{\hss .\hss}\hskip\z@ plus  1fill}%
  571. \def\dotfil{\leaders\hbox to.6em{\hss .\hss}\hfil}%
  572. \def\pfill{\unskip~\dotfill\penalty500\strut\nobreak
  573.                \dotfil~\ignorespaces}%
  574. \def\*{\leavevmode\lower.8ex\hbox{$\,\widetilde{\ }\,$}}
  575. \@ifundefined{main}{\def\main#1{\underline{#1}}}{}
  576. \@ifundefined{usage}{\def\usage#1{\textit{#1}}}{}
  577. \def\PrintIndex{\@input@{\jobname.ind}%
  578.                 \global\let\PrintIndex\@empty}
  579. \def\changes{\@bsphack\begingroup\@sanitize
  580.    \catcode`\\\z@ \catcode`\ 10 \MakePercentIgnore
  581.    \changes@}
  582. \def\changes@#1#2#3{%
  583.   \protected@edef\@tempa{\noexpand\glossary{#1\levelchar
  584.                                  \ifx\saved@macroname\@empty
  585.                                    \space
  586.                                    \actualchar
  587.                                    \generalname
  588.                                  \else
  589.                                    \expandafter\@gobble
  590.                                    \saved@macroname
  591.                                    \actualchar
  592.                                    \string\verb\quotechar*%
  593.                                    \verbatimchar\saved@macroname
  594.                                    \verbatimchar
  595.                                  \fi
  596.                                  :\levelchar #3}}%
  597.   \@tempa\endgroup\@esphack}
  598. \def\saved@macroname{}
  599. \def\generalname{General}
  600. \let\RecordChanges\makeglossary
  601. \newdimen\GlossaryMin         \GlossaryMin       = 80pt
  602. \newcount\c@GlossaryColumns   \c@GlossaryColumns = 2
  603. \ifhave@multicol
  604.   \newenvironment{theglossary}{%
  605.     \begin{multicols}\c@GlossaryColumns
  606.                      [\glossary@prologue][\GlossaryMin]%
  607.     \GlossaryParms \let\item\@idxitem \ignorespaces}%
  608.    {\end{multicols}}
  609. \else
  610.   \newenvironment{theglossary}{%
  611.       \@restonecoltrue\if@twocolumn\@restonecolfalse\fi
  612.       \columnseprule \z@  \columnsep 35\p@
  613.       \twocolumn[\glossary@prologue]%
  614.       \GlossaryParms \let\item\@idxitem \ignorespaces}
  615.     {\if@restonecol\onecolumn\else\clearpage\fi}
  616. \fi
  617. \long\def\GlossaryPrologue#1{\@bsphack
  618.                              \def\glossary@prologue{#1}%
  619.                              \@esphack}
  620. \@ifundefined{glossary@prologue}
  621.      {\def\glossary@prologue{\section*{{Change History}}%
  622.                  \markboth{{Change History}}{{Change History}}%
  623.                  }}{}
  624. \@ifundefined{GlossaryParms}{\let\GlossaryParms\IndexParms}{}
  625. \def\PrintChanges{\@input@{\jobname.gls}%
  626.                   \global\let\PrintChanges\@empty}
  627. \newcommand\AlsoImplementation{%
  628.    \long\def\StopEventually##1{\@bsphack\gdef\Finale{##1%
  629.                   \check@checksum}%
  630.               \init@checksum
  631.               \@esphack}%
  632.          }
  633. \AlsoImplementation
  634. \def\OnlyDescription{\@bsphack\long\def\StopEventually##1{%
  635.            ##1\endinput}\@esphack}
  636. \let\Finale\relax
  637. \begingroup
  638. \obeyspaces%
  639. \catcode`\^^M\active%
  640. \gdef\meta{\begingroup\obeyspaces\catcode`\^^M\active%
  641. \let^^M\do@space\let \do@space%
  642. \def\-{\egroup\discretionary{-}{}{}\hbox\bgroup\itshape}%
  643. \m@ta}%
  644. \endgroup
  645. \def\m@ta#1{\leavevmode\hbox\bgroup$\langle$\itshape#1\/$\rangle$\egroup
  646.     \endgroup}
  647. \def\do@space{\egroup\space
  648.     \hbox\bgroup\itshape\futurelet\next\sp@ce}
  649. \def\sp@ce{\ifx\next\do@space\expandafter\sp@@ce\fi}
  650. \def\sp@@ce#1{\futurelet\next\sp@ce}
  651. \def\IndexInput#1{%
  652.      \begingroup \macro@code
  653.    \frenchspacing \@vobeyspaces
  654.      \input{#1}\endmacrocode
  655.      \endgroup}
  656. \def\maketitle{\par
  657.       \begingroup \def \thefootnote {\fnsymbol {footnote}}%
  658.       \setcounter {footnote}\z@
  659.       \def\@makefnmark{\hbox to\z@{$\m@th^{\@thefnmark}$\hss}}%
  660.       \long\def\@makefntext##1{\parindent 1em\noindent
  661.             \hbox to1.8em{\hss$\m@th^{\@thefnmark}$}##1}%
  662.       \if@twocolumn \twocolumn [\@maketitle ]%
  663.       \else \newpage \global \@topnum \z@ \@maketitle \fi
  664.        \thispagestyle{titlepage}\@thanks \endgroup
  665.       \setcounter {footnote}\z@
  666.       \gdef\@date{\today}\gdef\@thanks{}%
  667.       \gdef\@author{}\gdef\@title{}}
  668. \@ifundefined{ps@titlepage}
  669.     {\let\ps@titlepage=\ps@plain}{}
  670. \def\MakeShortVerb#1{%
  671.   \expandafter\ifx\csname cc\string#1\endcsname\relax
  672.     \@shortvrbinfo{Made }{#1}%
  673.     \add@special{#1}%
  674.     \expandafter
  675.     \xdef\csname cc\string#1\endcsname{\the\catcode`#1}%
  676.     \begingroup
  677.       \catcode`\~\active  \lccode`\~`#1%
  678.       \lowercase{%
  679.       \global\expandafter\let
  680.          \csname ac\string#1\endcsname~%
  681.       \gdef~{\verb~}}%
  682.     \endgroup
  683.     \global\catcode`#1\active
  684.   \else
  685.     \@shortvrbinfo\@empty{#1 already}%
  686.   \fi}
  687. \def\DeleteShortVerb#1{%
  688.   \expandafter\ifx\csname cc\string#1\endcsname\relax
  689.   \else
  690.     \@shortvrbinfo{Deleted }{#1 as}%
  691.     \rem@special{#1}%
  692.     \global\catcode`#1\csname cc\string#1\endcsname
  693.     \global \expandafter\let \csname cc\string#1\endcsname \relax
  694.     \ifnum\catcode`#1=\active
  695.       \begingroup
  696.         \catcode`\~\active   \lccode`\~`#1%
  697.         \lowercase{%
  698.           \global\expandafter\let\expandafter~%
  699.           \csname ac\string#1\endcsname}%
  700.       \endgroup \fi \fi}
  701. \def\@shortvrbinfo#1#2{%
  702.   \PackageInfo{doc}{%
  703.      #1\expandafter\@gobble\string#2 a short reference
  704.                                           for \string\verb}}
  705. \def\add@special#1{%
  706.   \rem@special{#1}%
  707.   \expandafter\gdef\expandafter\dospecials\expandafter
  708.     {\dospecials \do #1}%
  709.   \expandafter\gdef\expandafter\@sanitize\expandafter
  710.     {\@sanitize \@makeother #1}}
  711. \def\rem@special#1{%
  712.   \def\do##1{%
  713.     \ifnum`#1=`##1 \else \noexpand\do\noexpand##1\fi}%
  714.   \xdef\dospecials{\dospecials}%
  715.   \begingroup
  716.     \def\@makeother##1{%
  717.       \ifnum`#1=`##1 \else \noexpand\@makeother\noexpand##1\fi}%
  718.     \xdef\@sanitize{\@sanitize}%
  719.   \endgroup}
  720. \def\MakeShortverb{\typeout{*** Switch to \noexpand\MakeShortVerb
  721.                          syntax, this is obsolete ***}\MakeShortVerb}
  722. \def\DeleteShortverb{\typeout{*** Switch to \noexpand\DeleteShortVerb
  723.                          syntax, this is obsolete ***}\DeleteShortVerb}
  724. \def\init@checksum{\relax
  725.     \global\bslash@cnt\z@}
  726. \def\check@checksum{\relax
  727.      \ifnum\check@sum=\z@
  728.        \typeout{**********************************}%
  729.        \typeout{* This macro file has no checksum!}%
  730.        \typeout{* The checksum should be \the\bslash@cnt!}%
  731.        \typeout{**********************************}%
  732.      \else
  733.        \ifnum\check@sum=\bslash@cnt
  734.          \typeout{*******************}%
  735.          \typeout{* Checksum passed *}%
  736.          \typeout{*******************}%
  737.        \else
  738.          \PackageError{doc}{Checksum not passed
  739.                     (\the\check@sum<>\the\bslash@cnt)}%
  740.           {The file currently documented seems to be wrong.^^J%
  741.            Try to get a correct version.}%
  742.        \fi
  743.      \fi
  744.      \global\check@sum\z@}
  745. \newcount\check@sum           \check@sum  = \z@
  746. \newcount\bslash@cnt          \bslash@cnt = \z@
  747. \def\CheckSum#1{\@bsphack\global\check@sum#1\relax\@esphack}
  748. \def\step@checksum{\global\advance\bslash@cnt\@ne}
  749. \def\CharacterTable{\begingroup \CharTableChanges \character@table}
  750. \begingroup
  751.   \catcode`\~=11
  752.   \gdef\character@table#1{\def\used~table{#1}%
  753.       \ifx\used~table\default~table
  754.            \typeout{***************************}%
  755.            \typeout{* Character table correct *}%
  756.            \typeout{***************************}%
  757.       \else
  758.          \PackageError{doc}{Character table corrupted}
  759.                            {\the\wrong@table}
  760.          \show\default~table
  761.          \show\used~table
  762.       \fi
  763.       \endgroup}
  764.   \global\let\CharTableChanges\@empty
  765.   \makeatother
  766.   \gdef\default~table
  767.      {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
  768.       Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
  769.       Digits        \0\1\2\3\4\5\6\7\8\9
  770.       Exclamation   \!     Double quote  \"     Hash (number) \#
  771.       Dollar        \$     Percent       \%     Ampersand     \&
  772.       Acute accent  \'     Left paren    \(     Right paren   \)
  773.       Asterisk      \*     Plus          \+     Comma         \,
  774.       Minus         \-     Point         \.     Solidus       \/
  775.       Colon         \:     Semicolon     \;     Less than     \<
  776.       Equals        \=     Greater than  \>     Question mark \?
  777.       Commercial at \@     Left bracket  \[     Backslash     \\
  778.       Right bracket \]     Circumflex    \^     Underscore    \_
  779.       Grave accent  \`     Left brace    \{     Vertical bar  \|
  780.       Right brace   \}     Tilde         \~}
  781. \endgroup
  782.   \newhelp\wrong@table{Some of the ASCII characters are corrupted.^^J
  783.             I now \string\show\space you both tables for comparison.}
  784. \newif\ifcodeline@index \codeline@indexfalse
  785. \let\CodelineNumbered\codeline@indextrue
  786. \def\codeline@wrindex#1{\if@filesw
  787.         \immediate\write\@indexfile
  788.             {\string\indexentry{#1}%
  789.             {\number\c@CodelineNo}}\fi}
  790. \let\special@index = \@gobble
  791. \def\CodelineIndex{\makeindex
  792.                    \codeline@indextrue
  793.                    \let\special@index\codeline@wrindex}
  794. \def\PageIndex{\makeindex
  795.                \codeline@indexfalse
  796.                \let\special@index\index}
  797. \newcount\c@CodelineNo  \c@CodelineNo\z@
  798. \@ifundefined{theCodelineNo}
  799.   {\ifx\selectfont\undefined
  800.      \def\theCodelineNo{\rmfamily\scriptsize\arabic{CodelineNo}}%
  801.    \else
  802.      \def\theCodelineNo{\reset@font\scriptsize\arabic{CodelineNo}}%
  803.    \fi}
  804.   {}
  805.        \tolerance=1000\relax
  806. { \catcode`\"=12
  807.   \global\mathcode`\\="705C \global\mathcode`\@="7040 }
  808. \@ifundefined{DocstyleParms}{}{}
  809. \DocstyleParms     \let\DocstyleParms\relax
  810. \@ifundefined{AmSTeX}
  811.    {\def\AmSTeX{\leavevmode\hbox{$\mathcal A\kern-.2em\lower.376ex%
  812.         \hbox{$\mathcal M$}\kern-.2em\mathcal S$-\TeX}}}{}
  813. \@ifundefined{BibTeX}
  814.    {\def\BibTeX{{\rmfamily B\kern-.05em%
  815.     \textsc{i\kern-.025em b}\kern-.08em%
  816.     T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}}{}
  817. \@ifundefined{SliTeX}
  818.    {\def\SliTeX{{\rmfamily S\kern-.06emL\kern-.18em\raise.32ex\hbox
  819.                 {\scshape i}\kern -.03em\TeX}}}{}
  820. \@ifundefined{PlainTeX}{\def\PlainTeX{\textsc{Plain}\kern2pt\TeX}}{}
  821. \@ifundefined{Web}{\def\Web{\textsc{Web}}}{}
  822. \def\MakePercentIgnore{\catcode`\%9\relax}
  823. \def\MakePercentComment{\catcode`\%14\relax}
  824. \def\DocInput#1{\MakePercentIgnore\input{#1}\MakePercentComment}
  825. \def\GetFileInfo#1{%
  826.   \def\filename{#1}%
  827.   \def\@tempb##1 ##2 ##3\relax##4\relax{%
  828.     \def\filedate{##1}%
  829.     \def\fileversion{##2}%
  830.     \def\fileinfo{##3}}%
  831.   \edef\@tempa{\csname ver@#1\endcsname}%
  832.   \expandafter\@tempb\@tempa\relax? ? \relax\relax}
  833. \endinput
  834. %%
  835. %% End of file `doc.sty'.
  836.